package org.jsoncrypto;

import javax.crypto.SecretKey;

import org.json.JSONObject;

public class JcLibAesCbc extends JcLibEnc_NONAEAD {
	JcLibAesCbc(JSONObject header, String encStr) throws JcBaseException {
		super(header, encStr);
	}
	
	JcLibAesCbc(String encodedJwtHeaderSegment,
			String encodedJwtKeySegment, String encodedJwtIvSegment, String encodedJwtCryptoSegment,
			String encodedJwtIntegritySegment) throws JcBaseException {
		super(encodedJwtHeaderSegment,
				encodedJwtKeySegment, encodedJwtIvSegment, encodedJwtCryptoSegment,
				encodedJwtIntegritySegment);
	}

	@Override
	String encrypt(byte[] contentBytes, SecretKey contentEncryptionKey, String encodedJweEncryptedKey, String encodedJwtIvSegment) throws JcBaseException {
    return JcBase.encryptAesCbc(contentBytes, mHeaderStr, contentEncryptionKey, mEncStr, encodedJweEncryptedKey, encodedJwtIvSegment );
	}
}
